import type { AppRouteModule } from '@/router/types';
import { LAYOUT } from '@/router/constant';

const workflow: AppRouteModule = {
  path: '/workflow',
  name: 'Workflow',
  component: LAYOUT,
  redirect: '/workflow/form',
  meta: {
    orderNo: 50,
    icon: 'ant-design:apartment-outlined',
    title: '工作流管理',
    hideMenu: true,
  },
  children: [
    {
      path: 'form',
      name: 'WorkflowForm',
      component: () => import('@/views/workflow/form/index.vue'),
      meta: { title: '表单定义', icon: 'ant-design:form-outlined' },
    },
    {
      path: 'form/builder',
      name: 'WorkflowFormBuilder',
      component: () => import('@/views/workflow/form/form-builder.vue'),
      meta: { title: '表单设计器', icon: 'ant-design:form-outlined', hideMenu: true },
    },
    {
      path: 'process',
      name: 'WorkflowProcess',
      component: () => import('@/views/workflow/process/index.vue'),
      meta: { title: '流程定义', icon: 'ant-design:deployment-unit-outlined' },
    },
    {
      path: 'process/designer',
      name: 'WorkflowProcessDesigner',
      component: () => import('@/views/workflow/process/process-designer.vue'),
      meta: { title: '流程设计器', icon: 'ant-design:deployment-unit-outlined', hideMenu: true },
    },
    {
      path: 'bind',
      name: 'WorkflowBind',
      component: () => import('@/views/workflow/bind/index.vue'),
      meta: { title: '流程-表单绑定', icon: 'ant-design:link-outlined' },
    },
    {
      path: 'roleProcessPerm',
      name: 'WorkflowRoleProcessPerm',
      component: () => import('@/views/workflow/roleProcessPerm/RoleProcessPermList.vue'),
      meta: { title: '流程权限分配', icon: 'ant-design:safety-certificate-outlined' },
    },
    {
      path: 'start',
      name: 'WorkflowStart',
      component: () => import('@/views/workflow/start/index.vue'),
      meta: { title: '发起流程', icon: 'ant-design:play-circle-outlined' },
    },
    {
      path: 'workbench',
      name: 'WorkflowWorkbench',
      component: () => import('@/views/workflow/workbench/index.vue'),
      meta: { title: '流程工作台', icon: 'ant-design:dashboard-outlined' },
    },
    {
      path: 'todo',
      name: 'WorkflowTodo',
      component: () => import('@/views/workflow/todo/index.vue'),
      meta: { title: '我的待办', icon: 'ant-design:check-square-outlined' },
    },
    {
      path: 'myProcess',
      name: 'WorkflowMyProcess',
      component: () => import('@/views/workflow/myProcess/index.vue'),
      meta: { title: '我发起的流程', icon: 'ant-design:file-text-outlined' },
    },
    {
      path: 'history',
      name: 'WorkflowHistory',
      component: () => import('@/views/workflow/history/index.vue'),
      meta: { title: '历史记录', icon: 'ant-design:history-outlined' },
    },
  ],
};

export default workflow; 
